import Loading from "./Loading.vue";
import Vue from "vue";

const loadingConstructor = Vue.extend(Loading);
let instance=null
const service = () => {
    if (!instance) {
        instance = new loadingConstructor()
    }
    // const instance = new loadingConstructor();
    instance.$mount(document.createElement("div"));
    document.body.appendChild(instance.$el)
    Vue.nextTick(() => {
        instance.isShowLoading = true;
    })
    return instance
}

export default service;